<template>
	<view class="wrap u-p-30">
		<u-navbar :title="name" :background="{backgroundColor: '#fff'}" title-size="40" back-icon-size="50" :custom-back="close" :title-color="'#000'"
		 :back-icon-color="'#000'" :back-text-style="{color: '#000'}">
		</u-navbar>
		<view class="u-p-t-30">
			<view>
				<u-row>
					<u-col span="1" >
						<span>
							<u-icon name="map" color="blue" size="60"></u-icon>
						</span>
					</u-col>
					<u-col span="10" class="u-p-l-20">
						<view class="u-font-32" style="color:#333;">摄像头</view>
						<view style="color:#999999" class="u-font-12">{{result.createTime}}</view>
					</u-col>
				</u-row>
			</view>
			<view class="u-p-l-20 u-p-t-30 u-p-b-50" style="color:#333333;font-size:16px;font-weight:bold">
				{{result.title}}
			</view>
			<view class="u-p-l-20 content_wrap" style="width:100%;height:500px;overflow:auto;">
				<rich-text style="width:300px;height:500px;" :nodes="result.content"></rich-text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data () {
			return {
				result: {},
				name: ""
			}
		},
		onLoad(option){
			this.name = option.name
			this.$u.api.gardenTrends({id:option.id}).then(res => {
				this.result = res
			}).catch(res => {
				this.$u.toast(res.msg)
			})
		},
		methods: {
			close () {
				uni.navigateBack()
			}
		}
	}
</script>

<style scoped lang="scss">
	page {
		background:#fff;
	}
	/deep/ .content_wrap img {
		width: 100%;height:100%;
	}
	/deep/ .content_wrap p, .content_wrap div {
		word-break: break-word;
	}
</style>
